#pragma once


// COverlay

#define OVERLAY_SNOW (1<<0)
#define OVERLAY_SANTA (1<<1)

class COverlay : public CWnd
{
        DECLARE_DYNAMIC(COverlay)

    public:
        COverlay();
        virtual ~COverlay();

        void Create(CWnd* pw, DWORD effect);

    protected:
        DECLARE_MESSAGE_MAP()

        afx_msg BOOL OnEraseBkgnd(CDC* pDC);
        afx_msg void OnPaint();
        afx_msg LRESULT OnNcHitTest(CPoint point);
        afx_msg void OnTimer(UINT_PTR nIDEvent);

    public:
        void SetSize(int x, int y);
        void SetPos(int x, int y);
        CBrush clear_color;

        // effect 1 - snow
        DWORD  mdw_effect;
        CArray <CPoint> m_s_postion;
        CArray <CPoint> m_s_direction;

        CBitmap mc_bitmap_snow;

        // effect 2 - santa
        CBitmap mc_bitmap_rudolph;
        CBitmap mc_bitmap_rudolph_mask;
        CBitmap mc_bitmap_santa1;
        CBitmap mc_bitmap_santa2;

        int  mn_pos;
        int  mn_frame;
        int  mn_frame2;
        int  mn_santa_pos;
        int  mn_type;
        int  mn_posy;

    private:
        void InitSnow();
        void UpdateSnow(CDC* dc, const CRect r, const CPoint& mouse);
        void InitSanta();
        void UpdateSanta(CDC* dc, const CRect r, const CPoint& mouse);
};


